package com.cskaoyan.wx.service;

import com.cskaoyan.mapper.OrderMapper;
import com.cskaoyan.wx.bean.vo.WxUserIndexInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WxUserServiceImpl implements WxUserService{
    @Autowired
    OrderMapper orderMapper;

    @Override
    public WxUserIndexInfoVo getUserIndexInfo(int userId) {
//        int unpaid = orderMapper.selectAmountByUserIdAndOrderStatus(userId,101);
//        int unship = orderMapper.selectAmountByUserIdAndOrderStatus(userId,201);
//        int unrecv = orderMapper.selectAmountByUserIdAndOrderStatus(userId,301);
//        int uncomment = orderMapper.selectAmountByUserIdAndOrderStatus(userId,401);
//
//        WxUserIndexInfoVo userIndexInfoVo = new WxUserIndexInfoVo();
//        //101、201、301、401三种状态
//        WxUserIndexInfoVo.OrderBean orderBean = new WxUserIndexInfoVo.OrderBean();
//        orderBean.setUncomment(uncomment);
//        orderBean.setUnpaid(unpaid);
//        orderBean.setUnrecv(unrecv);
//        orderBean.setUnship(unship);
//        userIndexInfoVo.setOrder(orderBean);
//
//        return userIndexInfoVo;
        return null;
    }
}
